import { Component, EventEmitter, Input, Output, OnInit, OnChanges } from '@angular/core';
import { Assembly, AssemblyStyles, AssemblyValidators } from '../../../fb-design.model'
import { SelectItem } from 'primeng/primeng';
@Component({
    selector: 'qk-textarea-attributes',
    templateUrl: 'qk-textarea-attributes.component.html',
    styleUrls: ['qk-textarea-attributes.component.scss'],
    providers: []
})
export class QkTextareaAttributes implements OnInit {
    @Input() assembly;
    @Output() onAttrChangedEmitter = new EventEmitter<Assembly>();
    @Input() 
    set names(names: string[]){
        let temp = [];
        names.forEach(e => temp.push({label: e, value: e}));
        this.nameItems = temp;
    }

    ngOnInit() {
    }

    fontSize: SelectItem[] = [{ label: '12px', value: 12 }, { label: '14px', value: 14 }, { label: '16px', value: 16 }, { label: '18px', value: 18 }, { label: '24px', value: 24 }, { label: '36px', value: 36 }, { label: '48px', value: 48 }];
    textAlign: SelectItem[] = [{ label: '左对齐', value: "left" }, { label: '居中', value: "center" }, { label: "右对齐", value: "right" }];
    fontFamily: SelectItem[] = [{ label: '微软雅黑', value: '"微软雅黑"' }, { label: '华文楷体', value: '"楷体","楷体_GB2312"' }, { label: '宋体', value: '"宋体"' }];
    yesNo: SelectItem[] = [{ label: '否', value: false }, { label: '是', value: true }];;
    nameItems: SelectItem[];

    constructor() { }

}